<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    //取得当前Web应用的名称
    String basepath = request.getContextPath();
%>
<script src="<%=basepath%>/static/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
    var basepath = '<%=basepath%>';
    jQuery(document).keydown(function (e) {
        var doPrevent;

        // for IE && Firefox
        var varkey = (e.keyCode) || (e.which) || (e.charCode);

        if (varkey == 8) {

            var d = e.srcElement || e.target;

            if (d.tagName.toUpperCase() == 'INPUT' || d.tagName.toUpperCase() == 'TEXTAREA') {

                doPrevent = d.readOnly || d.disabled;

                // for button,radio and checkbox
                if (d.type.toUpperCase() == 'SUBMIT'
                        || d.type.toUpperCase() == 'RADIO'
                        || d.type.toUpperCase() == 'CHECKBOX'
                        || d.type.toUpperCase() == 'BUTTON') {

                    doPrevent = true;
                }
            }
            else {

                doPrevent = true;
            }
        }
        else {

            doPrevent = false;
        }

        if (doPrevent)

            e.preventDefault();
    });
</script>
